package org.example.spring.repository.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

import static com.baomidou.mybatisplus.annotation.FieldFill.INSERT;
import static com.baomidou.mybatisplus.annotation.FieldFill.INSERT_UPDATE;

/**
 * LuoYu
 * 2022/12/12 18:57
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@TableName("orm_user_dept")
public class UserDept {

    /**
     * 主键
     */
    private Long id;



    /**
     * 主键
     */
    @TableField(value = "user_id")
    private Long userId;


    /**
     * 主键
     */
    @TableField(value = "dept_id")
    private Long deptId;



    /**
     * 创建时间
     */
    @TableField(fill = INSERT)
    private Date createTime;



    /**
     * 上次更新时间
     */
    @TableField(fill = INSERT_UPDATE)
    private Date lastUpdateTime;


}
